#include "simpledialog.h"
#include "ui_simpledialog.h"

#include <screenutil.h>
#include <simplewindow.h>

SimpleDialog::SimpleDialog(QWidget *parent) :
    FramelessDialog(parent),
    ui(new Ui::SimpleDialog)
{
    ui->setupUi(this);
    setupUi(ui->frame);
    setTitleIcon(QIcon::fromTheme("x").pixmap(30, 25));
}

SimpleDialog::~SimpleDialog()
{
    delete ui;
}

void SimpleDialog::on_pushButton_clicked()
{
    auto window = new SimpleWindow;
    window->show();

    ScreenUtil::moveCenterForCursor(*window);
}

